home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / diskmags / ararchive.lha / ARArchive / Install_ARArchive < prev    next >
Text File  |  1995-02-01  |  5KB  |  157 lines

  1. ;
  2. ; Install For ARArchive ©1995 Robert Reiswig
  3. ; $Id: ARArchive  1.5 
  4. ;
  5. (set osver (/ (getversion "LIBS:version.library") 65536))
  6. ( if (= osver 37) ( (set workbench "2.0")) ( if (= osver 38) ( (set workbench "2.1"))
  7. ( if (= osver 39) ( (set workbench "3.0")) ( if (= osver 40) ( (set workbench "3.1"))
  8. ( if (= osver 41) ( (set workbench "4.0")) )))))
  9.  
  10. ( if (= osver 37) ( (set DefCpu 0)) ( if (= osver 38) ( (set DefCpu 1))
  11. ( if (= osver 39) ( (set DefCpu 2)) ( if (= osver 40) ( (set DefCpu 3))
  12. ( if (= osver 41) ( (set DefCpu 4)) )))))
  13.  
  14.  
  15. (if (< osver 37)  (abort "Sorry You need 2.0 or higher to run ARArchiver!") )
  16.  
  17. (message "ARArchive V1.3.03\n\nBy: Robert Reiswig\nrcr@netcom.com\n\n"
  18.          "This Installer will do a few things:\n\nCopy ARArchive to where you tell it."
  19.          "\nAdd an AR: assign to your User-Startup.\n "
  20.          "Create a few scripts for ARArchive-LHA (If selected)"
  21.  
  22.  
  23.  
  24.  
  25. (set How  (askchoice (choices "In LHA format (ie: ar301.lha)" "In Uncompressed format (ie: ar301.guide)")
  26.                      (prompt "How do you store your Amiga Reports?")
  27.                  (help   "How do you store your Amiga Reports?")
  28.                      (default 0)
  29.       )
  30. )
  31.  
  32.  
  33. (if (= How 0) (set HowText "ARArchive-LHA") )
  34. (if (= How 1) (set HowText "ARArchive") )
  35.  
  36.  
  37.  
  38.  
  39. (set ARA_dest
  40.         
  41.            (askdir
  42.                    (prompt (cat "Where do you wish to install:\n" HowText))
  43.                    (help @askdir-help)
  44.                    (default @default-dest)
  45.                    
  46.            )
  47.                 
  48.         
  49. )
  50.  
  51.  
  52. (set @default-dest ARA_dest) 
  53.  
  54.  
  55. (if (= How 0) (set HowCompress "LHA'ed") )
  56. (if (= How 1) (set HowCompress "Uncompressed (AmigaGuide)") )
  57.  
  58. (set AR_dest
  59.      
  60.                 (askdir
  61.                         (prompt (cat "In which drawer are the\n*" HowCompress "* Amiga Reports\nstored?"))
  62.                         (help @askdir-help)
  63.                         (default @default-dest)
  64.                 )
  65.                 
  66. )
  67.  
  68.  
  69. (set DoThis (cat "ASSIGN AR: " AR_dest))
  70. (run (DoThis))
  71.  
  72.  
  73.  
  74. (if (= How 0)
  75.   (
  76.      (message "\n\n\n\nNOTE\n~~~~~~~~~~~~~\nYou must be running AREXX and have LHA in the command path "
  77.               "to use ARArchive!")
  78.    
  79.      (copyfiles (source "ARArchive-LHA.info") (dest ARA_dest) )
  80.      (copyfiles (source "ARArchive-LHA.guide") (dest "AR:") ) 
  81.  
  82.  
  83.      (set osverS (askchoice (choices "2.0" "2.1" "3.0" "3.1")
  84.                      (prompt "Please Select the OS Version you are running. "
  85.                              "This will be the Machine you will install ARArchive on. "
  86.                              "This is needed to tell the ARexx script to use AmigaGuide or Multiview. "
  87.                              "The Installer has found\n" workbench " version of the OS." )
  88.                  (help   "Select OS Ver")
  89.                      (default DefCpu)
  90.              )
  91.      )
  92.      
  93.  
  94.      (if (< osver 39) (set AGViewer "AmigaGuide") )
  95.      (if (> osver 38) (set AGViewer "Multiview") )
  96.  
  97.      
  98.      (textfile (dest (tackon ARA_dest "ARArchive-LHA"))
  99.                (append (cat AGViewer " AR:ARArchive-LHA.guide"))
  100.      )
  101.  
  102.      (textfile (dest (tackon "c:" "ARA"))
  103.                (append "/* ARA-Unlha Robert Reiswig V1.0   rcr@netcom.com */\n")
  104.                (append "ADDRESS COMMAND\n")
  105.                (append "parse arg ARfilePath ARfile\n")
  106.                (append " \n")    
  107.                (append "/* Set UnLha command , AmigaGuide Viewer, where to Uncompress */\n")
  108.                (append "Where = \"T:\"\n")
  109.                (append "UnLhaCommand = \"lha -q x\"\n") 
  110.                (append (cat "GuideViewer = \"" AGViewer "\"\n"))
  111.                (append " \n")
  112.                (append "/* Build Rexx Script */\n")
  113.                (append "cmd1 =  '\"' || UnLhaCommand || \" \" || ARfilePath || \" \" || Where || '\"'\n")
  114.                (append "ARFileZ = right(ARFile,(LENGTH(ARFile))-1)\n")
  115.                (append "cmd2 =  GuideViewer || \" \" || '\"' || Where || ARFileZ || '\"'\n")
  116.                (append "cmd3 = '\"' || 'delete >nil:' || \" \" || Where || \"AR#?\" || '\"'\n")
  117.                (append " \n")
  118.                (append "/* Execute - Unpack , display , delete */\n")
  119.                (append "interpret cmd1\n")
  120.                (append "interpret cmd2\n")
  121.                (append "say \"Thanks for using ARArchive-LHA\"\n")
  122.                (append "interpret cmd3\n")
  123.                (append " \n")
  124.  
  125.      )
  126.  
  127.   )
  128. )
  129.  
  130.  
  131. (if (= How 1)
  132.   (
  133.      (copyfiles (source "ARArchive")
  134.                 (dest ARA_dest)
  135.                 (infos)
  136.      )
  137.   )
  138. )
  139.  
  140.  
  141.  
  142. (startup "ARArchive"
  143.           (prompt "Adding an ASSIGN to your S:User-startup.")
  144.           (command (DoThis))
  145.           (help
  146.                   "\nIn order for ARArchive to find the Amiga Reports"
  147.                   "an assign must be made for AR:"
  148.           )
  149. )
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.